/* 
 * File:   md5Tests.cpp
 * Author: nahuel
 *
 * Created on May 29, 2013, 8:01:37 PM
 */

#include <stdlib.h>
#include <iostream>
#include "common_md5.h"

/*
 * Simple C++ Test Suite
 */

void testCalcularHashMD5Bloque() {
    char* bloque = "AAAAAAAABBBBBBBBCCCCCCCC";
    size_t size_bloque = 24;
    char hashMD5calculado[33];
    calcularHashMD5Bloque(bloque, size_bloque, hashMD5calculado);
    
    std::cout << "Hash: " << hashMD5calculado << std::endl;
    
    if (false /*check result*/) {
        std::cout << "%TEST_FAILED% time=0 testname=testCalcularHashMD5Bloque (md5Tests) message=error message sample" << std::endl;
    }
}

void testCalcularHashMD5Bloque2() {
    char* bloque = "AAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCAAAAAAAABBBBBBBBCCCCCCCC";
    size_t size_bloque = 96;
    char hashMD5calculado[33];
    calcularHashMD5Bloque(bloque, size_bloque, hashMD5calculado);
    
    std::cout << "Hash: " << hashMD5calculado << std::endl;
    
    if (false /*check result*/) {
        std::cout << "%TEST_FAILED% time=0 testname=testCalcularHashMD5Bloque (md5Tests) message=error message sample" << std::endl;
    }
}

int main(int argc, char** argv) {
    std::cout << "%SUITE_STARTING% md5Tests" << std::endl;
    std::cout << "%SUITE_STARTED%" << std::endl;

    std::cout << "%TEST_STARTED% testCalcularHashMD5Bloque (md5Tests)" << std::endl;
    testCalcularHashMD5Bloque();
    std::cout << "%TEST_FINISHED% time=0 testCalcularHashMD5Bloque (md5Tests)" << std::endl;
    
    std::cout << "%TEST_STARTED% testCalcularHashMD5Bloque2 (md5Tests)" << std::endl;
    testCalcularHashMD5Bloque2();
    std::cout << "%TEST_FINISHED% time=0 testCalcularHashMD5Bloque2 (md5Tests)" << std::endl;

    std::cout << "%SUITE_FINISHED% time=0" << std::endl;

    return (EXIT_SUCCESS);
}

